<template>

</template>
<script>
  import {fetchTree,userInfo} from '@/api/admin/user'
  import {resetRouter} from '@/router/router'
  import {getLoginUserOrgTree} from '@/api/admin/org'
  import {getStore, setStore} from '@/util/store'
  import {mapGetters} from 'vuex'
export default {
  name: 'selectDept',
  inject:['reload'],
    data() {
    return {
      checkedKeys: [],
      deptTreeData: [],
      defaultProps: {
        children: 'children',
        label: 'name'
      }
    }
  },
  computed: {
    ...mapGetters(['tagWel','userInfo'])
  },
  created() {
    this.getUserInfo();
  },
  methods: {
    // 获取部门树列表
      getUserInfo() {
          var query=this.$route.query;
          let token = query.accessToken;
          let refreshToken = query.refreshToken;
          console.log(token)
          this.$store.commit('SET_ACCESS_TOKEN', token)
          this.$store.commit('SET_REFRESH_TOKEN',refreshToken)
          userInfo().then(result => {
              console.log(result.data.data.sysUser)
              this.$store.commit('SET_USER_INFO', result.data.data.sysUser)
              this.$router.push({ path: '/dept' })
          })

    }
  }
}
</script>
<style lang="scss" scoped>
	/deep/ .el-tree-node.is-expanded>.el-tree-node__children {
		display: flex!important;
		flex-wrap: wrap!important;
	}
@keyframes error404animation {
  0% {
    transform: rotateZ(0deg);
  }
  20% {
    transform: rotateZ(-60deg);
  }
  40% {
    transform: rotateZ(-10deg);
  }
  60% {
    transform: rotateZ(50deg);
  }
  80% {
    transform: rotateZ(-20deg);
  }
  100% {
    transform: rotateZ(0deg);
  }
}
.error404 {
  &-body-con {
    width: 700px;
    height: 500px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    &-title {
      text-align: center;
      font-size: 240px;
      font-weight: 700;
      color: #2d8cf0;
      height: 260px;
      line-height: 260px;
      margin-top: 40px;
      span {
        display: inline-block;
        color: #19be6b;
        font-size: 230px;
        animation: error404animation 3s ease 0s infinite alternate;
      }
    }
    &-message {
      display: block;
      text-align: center;
      font-size: 30px;
      font-weight: 500;
      letter-spacing: 12px;
      color: #dddde2;
    }
  }
  &-btn-con {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 40px;
  }
}
</style>
